package com.xy.controller;

import com.xy.service.IPleadingsService;
import com.xy.utils.Response;
import com.xy.utils.ResponseFactory;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/api/pleadings")
@Tag(name = "诉讼状", description = "proofreading")
public class PleadingsController {
    private final IPleadingsService pleadingsService;

    @Autowired
    public PleadingsController(IPleadingsService pleadingsService) {
        this.pleadingsService = pleadingsService;
    }

    @GetMapping(value = "/getAllPeadings")
    public Response<Object> getAllPleadings(){
        return ResponseFactory.okResponse(pleadingsService.getAllPeadings());
    }

}
